This page last changed on Dec 19, 2005 by aperepel.

Mule uses javax.transaction.TransactionManager for managing transaction spanning multiple resources (XA). If you need the SUSPEND semantics for your transactions (i.e. this is what EJB's RequiresNew Tx attribute value does), then you have to use the transaction manager. Contrast this to a more typical javax.transaction.UserTransaction, which is just a thin handle to a transaction manager with limited (though in most cases sufficient) functionality. Particularly, it will not let you suspend the current transaction, otherwise it's merely the same.

Depending on your server, you can run Mule either standalone or embedded in the application server. This is not only your choice, but a requirement for some products, as one server will expose the transaction manager in JNDI, the other will not, and yet another will grant you access only via proprietary APIs. This is unfortunate, but still in line with Java EE 1.4 specification, which does not consider the transaction manager a public API. Thus, you are left to the mercy of your application server vendor.

The following table summarizes some common Java EE servers:

Application Server Remote Embedded Common Location Lookup class
JBoss java:/TransactionManager org.mule.transaction.lookup.JBossTransactionManagerLookupFactory
Weblogic javax.transaction.TransactionManager org.mule.transaction.lookup.WeblogicTransactionManagerLookupFactory
WebSphere Proprietary API call org.mule.transaction.lookup.WebsphereTransactionManagerLookupFactory
Resin java:comp/TransactionManager org.mule.transaction.lookup.Resin3TransactionManagerLookupFactory
JRun java:/TransactionManager org.mule.transaction.lookup.JRunTransactionManagerLookupFactory
Other specified via a jndiName property org.mule.transaction.lookup.GenericTransactionManagerLookupFactory

E.g. to use Weblogic's transaction manager:

<transaction-manager factory="org.mule.transaction.lookup.WeblogicTransactionManagerLookupFactory" />
Document generated by Confluence on Nov 27, 2006 10:27